<!doctype HTML>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<title>锦尚网修改手册</title>

<style>
body {
color: #333;
font-family: sans-serif;
font-size: 12pt;
line-height: 170%;
padding: 0 30px 0 270px;
}

header .banner {
margin: 0 0 1em 0;
}

header .banner, nav .banner {
color: #777;
font-size: 10pt;
font-weight: bold;
}

header h1 {
background: #0c3;
border-radius: 4px;
color: #fff;
font-size: 24pt;
margin: 0;
padding: 1.2em 0;
text-align: center;
}

nav {
font-size: 10pt;
overflow-x: auto;
overflow-y: auto;
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 240px;
}

nav .menubar {
border-bottom: solid 1px #ccc;
display: none;
height: 48px;
line-height: 48px;
padding: 0 10px;
}

nav .button {
background: #777;
border: 1px solid #333;
color: #fff;
font-size: 10pt;
font-weight: bold;
padding: 8px;
border-radius: 4px;
}

nav ul {
padding: 0 0 0 10px;
}

nav ul a {
color: #333;
text-decoration: none;
}

nav ul a:hover {
text-decoration: underline;
}

nav li {
line-height: 180%;
list-style: none;
margin: 0;
padding: 0;
}

nav .level2 {
font-size: 11pt;
font-weight: bold;
}

nav .level3 {
padding-left: 1em;
}

nav .level3:before { 
content: "» ";
}

nav .level4 {
padding-left: 2em;
}

nav .level4:before {
content: "› ";
}

article h2 {
border-bottom: dotted 1px #777;
font-size: 36px;
line-height: 100%;
margin: 2em 0 1em 0;
height:50px;
line-height: 50px;
}

article h3 {
font-size: 30px;
height:60px;
line-height: 60px;
padding-left:5px;
color:#FFFFFF;
background:#f94108;
}

article h4 {
font-size: 12pt;
font-style:bold;
font-weight: normal;
height:24px;
line-height:24px;
margin: 1.2em 0 1em 0;
padding: 10px;
color:#000000;
background:#cccccc;
}

article p {
margin: 1em 0;
}

article p code {
background: #eee;
border: 1px solid #ccc;
}

article p strong {
color: #f00;
}

article pre {
background: #eee;
border-left: solid 3px #3c0;
font-size: 10pt;
line-height:16px;
margin: 1em 0;
padding: 2em 0 2em 1em;
overflow-x: auto;
overflow-y: padding;
}

article blockquote {
background: #fff;
border: dashed 1px #777;
border-left: solid 2px #777;
color: #000;
margin: 0;
padding: 0 0 0 1em;
}

article ul, article ol {
padding-left: 2em;
}

article img{height:200px;width:auto;}

footer {
border-top: 1px solid #ccc;
font-size: 10pt;
margin-top: 4em;
}

@media (max-width: 768px) {

body {
padding: 0 10px 0 230px;
}

nav {
width: 230px;
}

}

@media (max-width: 480px) {

body {
padding: 64px 10px 0 10px;
}

header .banner {
display: none;
}

nav {
position: absolute;
width: 100%;
}

nav .menubar {
display: block;
}

nav .banner {
float: right;
}

nav ul {
background: #fff;
display: none;
font-size: 14pt;
margin: 0;
padding: 0 0 0 8px;
}

nav .level2 {
font-size: 16pt;
font-weight: bold;
}

nav li {
line-height: 240%;
}

.index nav ul {
display: block;
}

.index article {
display: none;
}

}
</style>
<script>
  (function (tags) {
    var i = 0, len = tags.length;

    for (; i < len; ++i) {
        document.createElement(tags[i]);
    }
  }([ 'header', 'nav', 'article', 'footer' ]));
</script>
</head>
<body>
<header>
<h1 id="-">锦尚网修改手册</h1>

</header>
<nav>
<div class="menubar">
<a class="button">&#9776;&nbsp;索引</a>
</div>
<ul>
<li class="level2"><a href="#1">锦尚网修改手册</a></li><li class="level3"><a href="#1.1">去掉版权</a></li><li class="level3"><a href="#1.2">core和tpl的用法</a></li><li class="level4"><a href="#1.2.1">html</a></li><li class="level4"><a href="#1.2.2">php</a></li></ul>

</nav>
<article>
<h2 id="1">锦尚网修改手册</h2>
<h3 id="1.1">去掉版权</h3>
<p>去掉 \addons\ewei_shop\static\js\require.js 下的  console.log 相关！如图：<br><img src="images/01.png" alt="">   </p>
<p>说明：在 <a href="http://tool.oschina.net/codeformat/js">http://tool.oschina.net/codeformat/js</a> 把 require.js 格式化以后再去掉！  </p>
<pre><code>try {
    if (window.console &amp;&amp; window.console.log) {
        console.log(&quot;\u300a\u8ba4\u51c6\u6dd8\u5b9d\u552f\u4e00\u66f4\u65b0\u6700\u5feb\u3001\u6700\u5b89\u5168\u3001\u6700\u7a33\u5b9a\u300b\u6dd8\u5b9d\u638c\u67dc\uff1a\u4f55\u8d35\u5f3a\u0031\u0039\u0039\u0030&quot;);
        console.log(&quot;\u6e29\u99a8\u63d0\u793a\uff1a\u6dd8\u5b9d\u5012\u5356\u4eba\u4eba\u5546\u57ce\u4e25\u91cd\uff0c\u5f88\u591a\u5e97\u94fa\u5c0f\u53f7\u8d2d\u4e70\u5927\u53f7\u5012\u5356\uff01\u8bf7\u8ba4\u51c6\u771f\u6b63\u4eba\u4eba\u5546\u57ce\u6e90\u5934\u5e97\u94fa\uff0c\u8c28\u9632\u88ab\u5012\u5356\u5e97\u94fa\u6240\u9a97\uff01&quot;);
        console.log(&quot;\u0031\u3001\u8ba4\u51c6\u6dd8\u5b9d\u5e97\u94fa\u5730\u5740\uff1a\u0068\u0074\u0074\u0070\u0073\u003a\u002f\u002f\u0069\u0074\u0065\u006d\u002e\u0074\u0061\u006f\u0062\u0061\u006f\u002e\u0063\u006f\u006d\u002f\u0069\u0074\u0065\u006d\u002e\u0068\u0074\u006d\u003f\u0069\u0064\u003d\u0035\u0032\u0033\u0032\u0034\u0034\u0033\u0039\u0030\u0038\u0039\u0039&quot;);
        console.log(&quot;\u0032\u3001\u5982\u679c\u4f60\u8d2d\u4e70\u7684\u5e97\u94fa\u4e0d\u662f\u6211\u4eec\u7684\u5e97\u94fa\uff0c\u90a3\u4e48\u4f60\u7684\u4eba\u4eba\u5546\u57ce\u66f4\u65b0\u548c\u7a0b\u5e8f\u5b89\u5168\u5f97\u4e0d\u5230\u4fdd\u969c&quot;);
        console.log(&quot;\u0033\u3001\u53ea\u6709\u6211\u4eec\u624d\u80fd\u63d0\u4f9b\u771f\u6b63\u5b98\u65b9\u6b63\u7248\u4eba\u4eba\u5546\u57ce\u6e90\u7801\u548c\u5b98\u65b9\u540c\u6b65\u66f4\u65b0\uff01\u9700\u8981\u7684\u53ef\u4ee5\u8fdb\u5165\u6211\u4eec\u5e97\u94fa\u8054\u7cfb\u5ba2\u670d\uff01&quot;);
    }
} catch(e) {};</code></pre>
<h3 id="1.2">core和tpl的用法</h3>
<h4 id="1.2.1">html</h4>
<p>位置： D:\www\www_company\jinshang\addons\ewei_shop\template\mobile\default\shop\test.html<br>说明：1、在头部引用 <code>require.js</code> 和 <code>config.js</code> （其实是 <code>jquery.js</code> 和 <code>tmod.js</code> 两部分），一个是dom节点，一个是js引用模板；<br>　　　2、<code>id=&quot;container&quot;</code> 里和 <code>&lt;script id=&#39;tpl_index&#39; type=&#39;text/html&#39;&gt;</code> 这两个部分是一体的；<br>　　　3、在最下边用 <code>$(&#39;#container&#39;).html(tpl(&#39;tpl_index&#39;))</code> 来把 <code>dom节点</code> 格式化为 <code>模板</code> ；<br>　　　4、如果想看function中的 core 和 tpl 加载的内容，可以用 <code>console.log(core);</code> 和 <code>console.log(tpl);</code> 。</p>
<pre><code>&lt;script language=&quot;javascript&quot; src=&quot;../addons/ewei_shop/static/js/require.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot; src=&quot;../addons/ewei_shop/static/js/app/config.js?v=2&quot;&gt;&lt;/script&gt;


&lt;div id=&#39;container&#39;&gt;&lt;/div&gt;
&lt;script id=&#39;tpl_index&#39; type=&#39;text/html&#39;&gt;
    tpl_index
&lt;/script&gt;


&lt;script language=&#39;javascript&#39;&gt;
    require([&#39;core&#39;, &#39;tpl&#39;], function (core, tpl) {
        $(&#39;#container&#39;).html(tpl(&#39;tpl_index&#39;));

    });
&lt;/script&gt;</code></pre>
<p>对于 config.js 这段代码，最干净的部分是这样的！  </p>
<pre><code>require.config({
    baseUrl: &#39;../addons/ewei_shop/static/js/app&#39;,
    paths: {
        &#39;jquery&#39;: &#39;../dist/jquery-1.11.1.min&#39;,
        &#39;tpl&#39;:&#39;../dist/tmodjs&#39;,
    },
});</code></pre>
<h4 id="1.2.2">php</h4>
<p>位置： D:\www\www_company\jinshang\addons\ewei_shop\core\mobile\shop\test.php<br>说明：很简单，只把模板调用过来就可了！  </p>
<pre><code>&lt;?php
include $this-&gt;template(&#39;shop/test&#39;);</code></pre>

</article>
<footer>
<p>© 2016.5 杨红伟</p>

</footer>
</body>
</html>
